﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SConsole = System.Console;

namespace Hydrogen.Console
{
    class TestProgram
    {
        static void Main(string[] args)
        {
            //ConsoleLog.Log("测试日志");
            //ConsoleLog.LogWarning("测试警告");
            //ConsoleLog.LogError("测试错误");
            //ConsoleLog.LogError(new Exception("xxx").ToString());

            List<ConsoleTreeNode> nodeList = new List<ConsoleTreeNode>();
            nodeList.Add(new ConsoleTreeNode() { level = 0, onDraw = () => ConsoleLog.WriteColorLine("Root", ConsoleColor.Cyan) });
            nodeList.Add(new ConsoleTreeNode() { level =1, onDraw = () => ConsoleLog.WriteColorLine("L1_1", ConsoleColor.Green) });
            nodeList.Add(new ConsoleTreeNode() { level =2, onDraw = () => ConsoleLog.WriteColorLine("L2_1", ConsoleColor.Blue) });
            nodeList.Add(new ConsoleTreeNode() { level =2, onDraw = () => ConsoleLog.WriteColorLine("L2_2", ConsoleColor.Blue) });
            nodeList.Add(new ConsoleTreeNode() { level =1, onDraw = () => ConsoleLog.WriteColorLine("L1_2", ConsoleColor.Green) });

            ConsoleLog.Write(nodeList);

            SConsole.Read();
        }
    }
}
